﻿@{
    ViewBag.Title = "RoleUpdate";
    Layout = "~/Views/Shared/_Layout.cshtml";
    Exam.Model.Role rolemodel = ViewData["Role"] as Exam.Model.Role;
}

<link href="~/Resources/Css/common.css" rel="stylesheet" />
<script src="~/resources/plugins/bootstrap-filestyle/1.2.1/bootstrap-filestyle.min.js"></script>
<script src="~/resources/plugins/ckeditor/4.5.5/standard/ckeditor.js"></script>
<script src="~/resources/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
<link href="~/resources/bootstrapvalidator/css/bootstrapValidator.min.css" rel="stylesheet" />
<script src="~/Resources/jquery-confirm/js/jquery-confirm.js"></script>
<link href="~/Resources/jquery-confirm/css/jquery-confirm.css" rel="stylesheet" />
<script src="~/Resources/bootstrap-treeview/bootstrap-treeview.min.js"></script>
<script src="~/Resources/Script/HtmlUtil.js"></script>
<link href="~/Resources/bootstrap-treeview/bootstrap-treeview.min.css" rel="stylesheet" />
<form id="RoleUpdateForm">
    <div class="boxmain">
        <!-- box / title -->
        <div class="title">
            <ol class="breadcrumb">
                <li><a href="javascript:void(0);" onclick="goBack()">Role Management</a></li>
                <li class="active">Update Role</li>
            </ol>
        </div>
        <div class="form-horizontal">
            <input type="hidden" id="hid" value="@rolemodel.RoleID" />
            <div class="form-group">
                <label class="col-sm-2 control-label"><span>*</span>Role Name</label>
                <div class="col-sm-10">
                    <input type="text" id="Rolename" name="Rolename" class="form-control" placeholder="Role Name" value="@rolemodel.RoleName" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">Is Active</label>
                <div class="col-sm-10">
                    @{
                        List<SelectListItem> list = new List<SelectListItem> {
                           new SelectListItem { Text = "Active", Value = "0" },
                           new SelectListItem { Text = "InActive", Value = "1" } };
                        list[rolemodel.IsActive].Selected = true;
                    }
                    @Html.DropDownList("PIsActive", list, new { @class = "form-control" })
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">Privileges</label>
                <div class="col-sm-10">
                    <div id="treeview-checkable" class=""></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">Description</label>
                <div class="col-sm-10">
                    <textarea name="desTextarea" id="desTextarea" rows="10" maxlength="2000"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-10">
                    <input type="submit" class="col-sm-1 btn btn-primary" value="Save" />
                    <input type="button" class="col-sm-1 btn btn-default" id="btnBack" onclick="javascript: goBack();" value="Back" />
                </div>
            </div>
        </div>
    </div>
</form>
<input type="hidden" id="hidDescription" value="@rolemodel.Remark" />
<input type="hidden" id="hidCreateTime" value="@rolemodel.CreateTime" />
<input type="hidden" id="hidCreateUserID" value="@rolemodel.CreateUserID" />
<input type="hidden" id="hidmenu" value='@ViewData["menu"]' />
<script src="~/Resources/Script/Role/RoleUpdate.js"></script>